package com.gxa.employment.service;


import com.aliyuncs.exceptions.ClientException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxa.employment.entity.dto.LoginDto;
import com.gxa.employment.entity.dto.PageWithPhoneDto;
import com.gxa.employment.entity.dto.UpdatePwdDto;
import com.gxa.employment.entity.pojo.Manager;
import com.gxa.employment.entity.vo.PageVo;
import com.gxa.employment.exception.BizException;

import java.util.HashMap;


/**
 * <p>
 * 管理员 服务类
 * </p>
 *
 * @author author
 * @since 2025-03-25
 */
public interface ManagerService extends IService<Manager> {
    /**
     * 登录方法
     * @return
     * @throws Exception
     */
    HashMap<String, Object> login(LoginDto loginDto) throws Exception;

    /**
     * 注册方法
     * @param loginDto
     * @throws Exception
     */
    void register(LoginDto loginDto) throws Exception;

    /**
     * 模糊查询方法
     * @param dto
     * @return
     */
    PageVo<Manager> getByPage(PageWithPhoneDto dto) throws Exception;

    /**
     * 手机号查询数据
     * @param phone
     */
    Manager getByPhone(String phone)  throws Exception;

    //添加方法  含分配权限
    void add(Manager manager);

    //发送验证码
    void sms(String phone) throws BizException, ClientException;

    //修改密码
    void updatePwd(UpdatePwdDto dto) throws BizException;
}
